﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="lp_l_scores_set.aspx.cs"
    Inherits="ZLDC.Estate.Quantify.lp_l_scores_set" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>最低分数设置</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        function IsNan(obj) {
            if (isNaN(obj.value)) {
                alert("请输入数字");
                obj.value = "";
                obj.focus();
                return false;

            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div style="margin: 10px 50px 50px 50px;">
        <div id="divht" runat="server">
            &nbsp;</div>
        <table border='0' cellpadding='0' cellspacing='1' bgcolor='#a8c7ce'>
            <tr>
                <td colspan="2" style="background-color: White; ">
                    <span id="spandept" runat="server"></span>
                </td>
            </tr>
            <tr>
                <td class="td1">
                    部门：
                </td>
                <td style="background-color: White">
                    <asp:Label ID="lblDeptName" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="td1">
                    最低分数：
                </td>
                <td style="background-color: White">
                    <asp:TextBox ID="lowsetScores" onkeyup="IsNan(this)" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2" style="background-color: White">
                    <asp:Button ID="btnSave" runat="server" Text="保存" class="l-button" OnClick="btnSave_Click"
                        OnClientClick="return Crbtn()" />

                    <script type="text/javascript">
                        function Crbtn() {
                            var Fractionlist = '<%=Fractionlist %>';
                            var Scores = document.getElementById('lowsetScores').value;
                            if (Scores == '') {
                                Scores = 0;
                            }

                            if (Fractionlist != "") {
                                if (Fractionlist.split(',').length > 1) {
                                    if (parseInt(Scores) < parseInt(Fractionlist.split(',')[Fractionlist.split(',').length - 2])) {

                                        alert('不能低于上级最低分数!')
                                        return false;

                                    }
                                }
                                else {

                                    return false;
                                }
                            }
                            return true;
                        }
                    </script>

                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
